<template>
    <basic-container>
        <TitleComponent mainTitle="资金流水" />
        <avue-crud :option="option" :table-loading="crudData.loading" :data="crudData.data" :page.sync="crudData.page"
            v-model="crudData.form" ref="crud" @on-load="onLoad">
        </avue-crud>
    </basic-container>
</template>
<script setup lang="ts" name="taskDetail">
import { reactive } from 'vue';
// import {getList} from "@/api/user/overview.js";
import TitleComponent from '@/components/title/index.vue';
import BasicContainer from '@/components/basic-container/main.vue';

let option: any = reactive({
    height: 'auto',
    calcHeight: 100,
    searchShow: true,
    searchMenuSpan: 6,
    tip: false,
    border: true,
    index: false,
    viewBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    excelBtn: true,
    gridBtn: false,
    dialogWidth: '40%',
    menuFixed: 'right',
    labelWidth: 130,
    menu: false,
    selection: true,
    searchLabelWidth: 110,
    indexLabel: '序号',
    saveBtnText: '确定',
    refreshBtn: true, // 刷新按钮
    columnBtn: false,
    searchShowBtn: false,
    indexWidth: 60,
    column: [
        {
            label: "手机号",
            prop: "phone",
            // search: true,
            span: 24,
        },
        {
            label: "资金类型",
            prop: "type",
            span: 24,
        },
        {
            label: "变动之前",
            prop: "test0",
            span: 24,
        },
        {
            label: "数量",
            prop: "test",
            span: 24,
        },
        {
            label: "变动之后",
            prop: "test1",
            span: 24,
        },
        {
            label: "交易类型",
            prop: "test2",
            // search: true,
            span: 24,
        },
        {
            label: "来源",
            prop: "test3",
            span: 24,
        },
        {
            label: "时间",
            prop: "test4",
            span: 24,
        },
    ]
})
let crudData: any = reactive({
    loadingSubmit: false,
    loadingSave: false,
    index_unit: [],
    loading: true,
    active: 1,
    page: {
        pageSize: 10,
        currentPage: 1,
    },
    filedArr: [],
    data: []
})
const onLoad = () => {
    crudData.loading = false;
    crudData.data = [
        {
            id: '1',
            phone: '1234567890',
            type: '余额',
            test0: '1000',
            test: '100',
            test1: '1100',
            test2: '购买理财',
            test3: '7563763',
            test4: '2024-07-06 12:00:00',
        },
        {
            id: '2',
            phone: '1234567890',
            type: '余额',
            test0: '1100',
            test: '200',
            test1: '1300',
            test2: '任务返佣',
            test3: '6524654624',
            test4: '2024-07-07 12:00:00',
        },
        {
            id: '3',
            phone: '0987654321',
            type: '积分',
            test0: '500',
            test: '50',
            test1: '550',
            test2: '下级升级返佣',
            test3: '64562654624',
            test4: '2024-07-06 13:00:00',
        },
        {
            id: '4',
            phone: '1122334455',
            type: '余额',
            test0: '800',
            test: '100',
            test1: '900',
            test2: '系统操作',
            test3: '银行卡',
            test4: '2024-07-06 14:00:00',

        },
        {
            id: '5',
            phone: '1122334455',
            type: '余额',
            test0: '900',
            test: '150',
            test1: '1050',
            test2: '系统操作',
            test3: '64526256462',
            test4: '2024-07-07 15:00:00',
        },
    ];
    crudData.page.total = crudData.data.length;

    // getList().then((res: any) => {
    //     console.log('getReviewLog--', res);
    //     const Data = res.data.data;
    //     // crudData.page.total = Data.total;
    //     crudData.logData = Data;
    //     crudData.loading = false;
    // });
}
</script>
<style scoped lang="scss"></style>